#if !NETCOREAPP
using GameFramework.Network.MessagePack;
using GameFramework.Request;
#endif
using System;
using GameFramework.Reference;
using MessagePack;

namespace Server.Proto
{
    /// <summary>
    /// 角色基础信息
    /// </summary>
    [MessagePackObject(true)]
    public class RoleBasic : MessageObject
    {
        /// <summary>
        /// 角色id
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 帐号id
        /// </summary>
        public long AccountId { get; set; }

        /// <summary>
        /// 角色名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 角色标记
        /// </summary>
        public RoleFlags Flags { get; set; }

        /// <summary>
        /// 角色等级
        /// </summary>
        public ushort Level { get; set; }

        /// <summary>
        /// vip等级
        /// </summary>
        public byte VipLevel { get; set; }

        /// <summary>
        /// 创角时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 登陆时间
        /// </summary>
        public DateTime LoginTime { get; set; }

        /// <summary>
        /// 上一次离线时间
        /// </summary>
        public DateTime OfflineTime { get; set; }

        public override void OnRecycle()
        {
            Id = default;
            AccountId = default;
            Name = string.Empty;
            Flags = default;
            Level = default;
            VipLevel = default;
            CreateTime = default;
            LoginTime = default;
            OfflineTime = default;
        }
    }
}